<!--只要修改value就会触发-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>onchange事件注册</title>
    <script type="text/javascript">
        function onchangeFunc() {
            alert("内容已经改变(静态)");
        }

        window.onload = function () {
            var obj = document.getElementById("id0001");
            obj.onchange = function () {
                alert("内容已经改变(动态)");
            }
        }
    </script>
</head>
<body>
<input type="text" onchange="onchangeFunc();"/><br/>
<select id="id0001">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
</select>

</body>
</html>